
package com.kaver.dao.config;

import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component;

import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;


@Component
public class MybatisMetaObjectHandler implements MetaObjectHandler{
	@Override
	public void insertFill(MetaObject metaObject) {
        metaObject.setValue("createTime", System.currentTimeMillis());
        metaObject.setValue("deleted", "0");
	}

	@Override
	public void updateFill(MetaObject metaObject) {
        this.setFieldValByName("updateTime", System.currentTimeMillis(),metaObject);
	}

}
